package com.ruoyi.project.module.dicinfo.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.module.dicinfo.mapper.DicinfoMapper;
import com.ruoyi.project.module.dicinfo.domain.Dicinfo;
import com.ruoyi.project.module.dicinfo.service.IDicinfoService;
import com.ruoyi.common.support.Convert;

/**
 * 字典 服务层实现
 * 
 * @author ruoyi
 * @date 2018-11-11
 */
@Service
public class DicinfoServiceImpl implements IDicinfoService 
{
	@Autowired
	private DicinfoMapper dicinfoMapper;

	/**
     * 查询字典信息
     * 
     * @param id 字典ID
     * @return 字典信息
     */
    @Override
	public Dicinfo selectDicinfoById(Integer id)
	{
	    return dicinfoMapper.selectDicinfoById(id);
	}
	
	/**
     * 查询字典列表
     * 
     * @param dicinfo 字典信息
     * @return 字典集合
     */
	@Override
	public List<Dicinfo> selectDicinfoList(Dicinfo dicinfo)
	{
	    return dicinfoMapper.selectDicinfoList(dicinfo);
	}
	
    /**
     * 新增字典
     * 
     * @param dicinfo 字典信息
     * @return 结果
     */
	@Override
	public int insertDicinfo(Dicinfo dicinfo)
	{
	    return dicinfoMapper.insertDicinfo(dicinfo);
	}
	
	/**
     * 修改字典
     * 
     * @param dicinfo 字典信息
     * @return 结果
     */
	@Override
	public int updateDicinfo(Dicinfo dicinfo)
	{
	    return dicinfoMapper.updateDicinfo(dicinfo);
	}

	/**
     * 删除字典对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteDicinfoByIds(String ids)
	{
		return dicinfoMapper.deleteDicinfoByIds(Convert.toStrArray(ids));
	}

	@Override
	public List<Dicinfo> selectDicinfoList() {
		return dicinfoMapper.selectDicinfoList();
	}

}
